﻿#pragma once
#include "Common/ActivityDefine.h"
#include "Common/TableData/ActivityDailyCfg.h"
#include "Common/ComTypeDefine.h"
#include "Common/AccountDefine.h"

class GActivity
{
public:
	GActivity();
	virtual ~GActivity();
public:
	virtual void Init(uint32_t activityId);
	virtual void UnInit();
	//virtual int32_t	GetType() { return ATI_NONE; };
	virtual int32_t	GetType() { return m_type; };
	virtual void	SetType(ACTIVITY_TYPE_ID type) { m_type = type; };
	virtual bool	StartActivity();	//活动开始
	virtual void	StopActivity();		//活动结束
	virtual bool	Update(){ return true; }

	///////////////////////// 工会活动 /////////////////////////////////////////////////
	//初始化工会参数
	virtual void InitUnionParam(uint32_t unionId, uint32_t sceneId, uint32_t mapId, int32_t unionLev, int32_t averageLev,int32_t collegaLev,int32_t vaultLev) {};
	//进入工会驻地
	virtual void OnEnterUnionHome(CharIDType charId){};
	//工会等级更新
	virtual void OnUnionLevUpdate(int32_t unionLev){};
	//npc对话
	virtual int32_t TalkToNpc(Player *pPlayer, uint64_t npcCid, int32_t reply, int8_t &type){ return RET_FAIL; };


	///////////////////////// 世界Boss ////////////////////////////////////////////////////
	virtual void InitWorldBossParam(const WorldBossInfo& worldBossInfo){}

	virtual void InitSonOfKillingParam(const CLSonOfKillingOpenReq& sonOfKillingInfo){}

	virtual void InitChaosDragonParam(const ChaosDragonInfo& chaosDragonInfo){}

	virtual void InitLostCityParam(const LostCityInfo& lostCityInfo){}

	////////////////////////// 怪物攻城 ////////////////////////////////////////////////
	virtual bool InitMonsAttackCity(const MonsAttackCityProto &proto){ return false; }

public:
	uint32_t GetId() const;
	bool	IsRuning() const;
	void	Participating(CharIDType charId);	//正在参与活动
	void	FinishActivity();					//完成活动

protected:
	virtual void	OnActivityStart(){};	//活动开启回调子类实现
	virtual void	OnActivityStop(){};	//活动结束回调子类实现
protected:
	uint32_t		m_activityId;	//活动ID
	ACTIVITY_STATE	m_nState;		//活动状态
	ACTIVITY_TYPE_ID m_type;
	SET_UINT64 m_joinList;			//参与获得的角色列表
};


